(function(){
	wlxer = {
		init:function(){
			var self = this;
			//清除
			self.clearInput();
		},
		clearInput:function(){
			var again = false;

			//输入内容显示『X』	
			$('.step input').on('keyup focus',function(){
				var $this = $(this),
					$clear = $this.next('.weui-icon-clear'),
					phone = $this.val();
				
				$('.weui-icon-clear').addClass('f-dn');
				if ( phone!='' ){
					$clear.removeClass('f-dn');
				} else {
					$clear.addClass('f-dn');
				}

			});

			//清除输入的内容
			$('.weui-icon-clear').on('click',function(){
				var $this = $(this),
					$input = $this.prev();
				$input.val('');
				$this.addClass('f-dn');
			});
		}
	}
})()

$(function(){
	wlxer.init();
});